# cross compile

export CGO_ENABLED=0

for OS in darwin linux; do
    for ARCH in 386 amd64; do
        export GOOS=$OS
        export GOARCH=$ARCH
        echo building $GOOS-$GOARCH
        go build -o ./build/sgbm-$GOOS-$GOARCH/sgbm-cli ./src
    done
done

for ARCH in 386 amd64; do
    export GOOS=windows
    export GOARCH=$ARCH
    echo building $GOOS-$GOARCH
    go build -o ./build/sgbm-$GOOS-$GOARCH/sgbm-cli.exe ./src
done
